import request from '@/utils/http'

/**
 * 获取菜单列表
 * @param params
 */
export function getMenuList(params: any) {
	return request.get<Http.BaseResponse>({
		url: '/api/menu',
		params: params
	})
}

/**
 * 创建菜单
 * @param params
 */
export function createMenu(params: any) {
	return request.post<Http.BaseResponse>({
		url: '/api/menu',
		params: params,
		showSuccessMessage: true
	})
}

/**
 * 更新菜单
 * @param params
 */
export function updateMenu(params: any) {
	return request.put<Http.BaseResponse>({
		url: '/api/menu',
		params: params,
		showSuccessMessage: true
	})
}